package model

func GetMenu(id string) []map[string]string {
	menuList := Orm.Table("sys_user su").
		Field("distinct sm.id,sm.menu_name,sm.menu_pid,sm.menu_path").
		Join("sys_role_user sru", "sru.user_id = su.id").
		Join("sys_role_menu srm", "srm.role_id = sru.role_id").
		Join("sys_menu sm", "sm.id = srm.menu_id").
		Where("su.id", "=", id).
		Select()
	return menuList
}
